Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make IMDS unavailability easier to debug #19423

Merged
merged 1 commit into from
Jun 25, 2021
Merged

Conversation

chlowell
Copy link
Member

A few small changes to make it easier to understand why ImdsCredential decided IMDS is unavailable (#19091):

  1. use raise from to expose the exceptions motivating authentication errors
  2. remove redundant logging of IMDS unavailability (the resulting authentication exception is logged at a higher level elsewhere)
  3. raise a consistent error message on subsequent get_token calls after deciding IMDS is unavailable

Copy link
Member

@mccoyp mccoyp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@chlowell chlowell merged commit 52109c4 into Azure:main Jun 25, 2021
@chlowell chlowell deleted the imds-exception branch June 25, 2021 15:32
iscai-msft added a commit that referenced this pull request Jun 25, 2021
…into rest_layer

* 'main' of https://github.com/Azure/azure-sdk-for-python:
  [core] add testserver (#19153)
  autorest repo needs to checkout from master still (#19499)
  [Event Hubs] [Service Bus] add logging snippet to readme (#19171)
  apiview / anna feedback (#19473)
  Make IMDS unavailability easier to debug (#19423)
  [Resourcehealth] first release (#19484)
  CAE support for azure-mgmt-core (#19365)
  Update references from master to main (#19471)
  Update links from master to main
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants